package com.lam.mall.entity;

import java.math.BigDecimal;
import java.util.List;

import javax.validation.constraints.Null;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.components.dict.annotation.Dict;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.validate.annotation.DictValid;
import com.lam.common.validate.group.Add;

/**
 * 包邮项对象 mall_trans_free
 * 
 * @author admin
 * @date 2023-04-21
 */
@DictCheck
@TableName("mall_trans_free")
public class TransFree implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 运费模板id */
    private String transFeeTemplateId;

    /** 包邮方式 （0-满x件/重量/体积包邮, 1-满金额包邮, 2-满x件/重量/体积且满金额包邮） */
    @DictValid(message = "无效的包邮方式 ")
    @Dict(dictCode = "free_type")
    private Integer freeType;
    
    @TableField(exist = false)
    private String freeTypeDictText;

    /** 需满金额 */
    private BigDecimal amount;

    /** 包邮x件/重量/体积 */
    private BigDecimal piece;
    
    /**
     * 指定条件包邮城市项
     */
    @TableField(exist=false)
    private List<Area> cityList;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setTransFeeTemplateId(String transFeeTemplateId) {
        this.transFeeTemplateId = transFeeTemplateId;
    }

    public String getTransFeeTemplateId() {
        return transFeeTemplateId;
    }    
    
    public void setFreeType(Integer freeType) {
        this.freeType = freeType;
    }

    public Integer getFreeType() {
        return freeType;
    }    
    
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAmount() {
        return amount;
    }    
    
    public void setPiece(BigDecimal piece) {
        this.piece = piece;
    }

    public BigDecimal getPiece() {
        return piece;
    }

	public List<Area> getCityList() {
		return cityList;
	}

	public void setCityList(List<Area> cityList) {
		this.cityList = cityList;
	}

	public String getFreeTypeDictText() {
		return freeTypeDictText;
	}

	public void setFreeTypeDictText(String freeTypeDictText) {
		this.freeTypeDictText = freeTypeDictText;
	}    
    

}
